#ifndef CARD_H
#define CARD_H

#include <QWidget>

class Card : public QWidget {
    Q_OBJECT
public:
    Card(int value, QWidget* parent = nullptr);
    int value() const { return m_value; }
    bool isFaceUp() const { return m_isFaceUp; }
    void setFaceUp(bool faceUp);

protected:
    void paintEvent(QPaintEvent* event) override;
    void mousePressEvent(QMouseEvent* event) override;
    void mouseMoveEvent(QMouseEvent* event) override;

private:
    int m_value;
    bool m_isFaceUp;
    QPoint m_dragStartPos;
};

#endif // CARD_H
